package com.yy.springcloud.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    //404 not found
    private Integer code;
    private String message;
    private T data;

    //没有data的时候，构造方法中只有无参和全参 添加两个参数的
    public CommonResult(Integer code ,String message){
        this(code,message,null);
    }
}
